package com.ssm.modules.dao;

import com.ssm.modules.entity.Course;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;

import java.security.PrivateKey;
import java.util.List;


public interface ICourseDao {

   List<Course> selectAll();

   int addCourse(Course course);

   int updateCourse(Course course);

   int deleteCourse(int id);

   List<Course> findByStuId(@Param("stuId")int stuId,
                            @Param("page") int page,
                            @Param("pageSize") int pageSize);

   int findByStuIdCount(@Param("stuId")int stuId);

   List<Course> findByTeaId(@Param("teaId")int teaId,
                            @Param("page") int page,
                            @Param("pageSize") int pageSize);

   int findByTeaIdCount(int teaId);

   List<Course> findByTeaIdAndCourseId(@Param("teaId")int teaId,
                                       @Param("courseId") int courseId,
                                       @Param("page") int page,
                                       @Param("pageSize") int pageSize);

   int findByTeaIdAndCourseIdCount(@Param("teaId")int teaId,
                                   @Param("courseId") int courseId);

   int grade(@Param("stuId")int stuId,
             @Param("score") int score,
             @Param("courseId") int courseId);

}
